<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改客户')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-customer-edit" th:object="${hmsCustomer}">
            <input name="cusId" th:field="*{cusId}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">客户id：</label>
                <div class="col-sm-8">
                    <input name="cusUuid" th:field="*{cusUuid}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">客户名称：</label>
                <div class="col-sm-8">
                    <input name="cusName" th:field="*{cusName}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">客户性别：</label>
                <div class="col-sm-8">
                    <input name="cusGender" th:field="*{cusGender}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">客户类型：</label>
                <div class="col-sm-8">
                    <select name="cusType" class="form-control m-b">
                        <option value="">所有</option>
                    </select>
                    <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">客户手机号码：</label>
                <div class="col-sm-8">
                    <input name="cusTel" th:field="*{cusTel}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">客户姓名：</label>
                <div class="col-sm-8">
                    <input name="cusRealName" th:field="*{cusRealName}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">用户状态：</label>
                <div class="col-sm-8">
                    <div class="radio-box">
                        <input type="radio" name="cusStatus" value="">
                        <label th:for="cusStatus" th:text="未知"></label>
                    </div>
                    <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">授信额度(单位：元)：</label>
                <div class="col-sm-8">
                    <input name="cusCreditLine" th:field="*{cusCreditLine}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">最大的授信额度：</label>
                <div class="col-sm-8">
                    <input name="cusMaximumCreditLine" th:field="*{cusMaximumCreditLine}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">已下订单：</label>
                <div class="col-sm-8">
                    <input name="cusOrderPlaced" th:field="*{cusOrderPlaced}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">未结订单：</label>
                <div class="col-sm-8">
                    <input name="cusOpenOrders" th:field="*{cusOpenOrders}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">累计订单金额：</label>
                <div class="col-sm-8">
                    <input name="cusCumulativeOrderAmount" th:field="*{cusCumulativeOrderAmount}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">未结订单金额：</label>
                <div class="col-sm-8">
                    <input name="cusOpenOrderAmount" th:field="*{cusOpenOrderAmount}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">客户创建时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="cusCreateTime" th:value="${#dates.format(hmsCustomer.cusCreateTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">客户更新时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="cusUpdateTime" th:value="${#dates.format(hmsCustomer.cusUpdateTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "system/customer";
        $("#form-customer-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-customer-edit').serialize());
            }
        }

        $("input[name='cusCreateTime']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

        $("input[name='cusUpdateTime']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>